select oos_util_string.to_char(123)
from dual;

select oos_util_string.to_char(sysdate)
from dual;

select oos_util_string.to_char(systimestamp)
from dual;

begin
  dbms_output.put_line(oos_util_string.to_char(true));
  dbms_output.put_line(oos_util_string.to_char(false));
end;


select
  oos_util_string.truncate(
    p_str => comments,
    p_length => 20,
    p_by_word => 'N'
  ) by_word_n,
  oos_util_string.truncate(
    p_str => comments,
    p_length => 20,
    p_by_word => 'Y'
  ) by_word_y
from apex_dictionary
where 1=1
  and rownum <= 5;
  
select oos_util_string.sprintf('hello %s', 'martin') demo
from dual;


select oos_util_string.sprintf('%s2, %s1, %s1', 'Firstname', 'Lastname') demo
from dual;

declare
  l_str clob := 'abc,def,ghi';
  l_arr oos_util.tab_vc2_arr;
begin
  l_arr := oos_util_string.string_to_table(p_str => l_str);

  for i in 1..l_arr.count loop
    dbms_output.put_line('i: ' || i || ' ' || l_arr(i));
  end loop;
end;

select rownum, column_value
from table(oos_util_string.listunagg('abc,def'));

begin
  dbms_output.put_line(oos_util_string.reverse('abc'));
end;

select level,oos_util_string.ordinal(level)
from dual
connect by level <= 10;
